1. Field of the Invention
The following embodiments relate to a technology for scheduling and processing tasks in a real-time system used in a robot system, and in middleware operated in a general Operating System (OS), such as Linux, and Windows, and more particularly, to an algorithm for efficiently scheduling each of tasks based on characteristics of the tasks and processing the tasks. Additionally, the following embodiments relate to a method of enabling tasks to be executed in real time in middleware operated in a general OS.
2. Description of the Related Art
A real-time system, such as a robot system, typically processes tasks including aperiodic real-time tasks, periodic tasks, and non-real-time tasks. In particular, a periodic task may be executed based on a specific period, and may be classified into two types, namely a task that may generate data or receive data from another task, may process the data, and may transmit the processed data to the other task, and a task that may merely process data transmitted from another task.
Due to a precedence relation between periodic tasks in operations, all periodic tasks need to be executed in a period, and need to generate and use data according to set precedence constraints. Researches have been conducted on techniques of obtaining suboptimal solutions, rather than optimal solutions, using a heuristic method. Additionally, researches have been conducted on a scheduling technique of processing periodic tasks together with aperiodic real-time tasks. The aperiodic real-time tasks may be used to process an event occurring at an unspecified time, for example an alarm.
Scheduling of the real-time system may be classified into on-line scheduling and off-line scheduling, based on a point in time in which scheduling is realized. The on-line scheduling may have an advantage of flexibility, but is limited to solve a problem, such as precedence constraints between tasks, and the like.
In the off-line scheduling, operating times or priorities are assigned to periodic tasks in advance, before the system is performed. Accordingly, the off-line scheduling may not be suitable to schedule aperiodic real-time tasks occurring at an unspecified time.
Robot software components may be divided into components with only software, and components interoperating with hardware. The components may be executed by scheduling, to control a robot. In a robot system, components need to be executed periodically or in real-time, in the same manner as the above-described tasks. Specifically, since the robot system is operated in real time, a real-time OS may be applied to the robot system without any problem. However, when is used together with an OS and when component tasks are executed in the middleware, a problem may occur. In particular, when a general OS is applied to the robot system, a serious problem may occur, for example periodic execution may disappear. Since the middleware controls component tasks, despite the real-time OS being used, a similar problem may occur.